﻿using Common;
using System;
using System.Collections.Generic;
using System.Text;

namespace MVP
{
    public class PeriodBulanPresenter : BasePresenter<IPeriodBulanView>
    {
        private IPeriodBulanView _view;

        public PeriodBulanPresenter(IPeriodBulanView view)
            : base(view)
        {
            _view = view;
        }

        public void Initialize()
        {
            IList<String> months = new List<String>();
            foreach (String month in Enum.GetNames(typeof(EnumMonth)))
            {
                months.Add(month);
            }
            _view.Months = months;
            _view.Year = DateTime.Now.Year;
        }

        protected override void OnViewInitialize(object sender, EventArgs e)
        {
            base.OnViewInitialize(sender, e);
            Initialize();
        }

    }
}
